xboxlive_fire_event


Description

This function can be used to fire a stat event. The "event_name" argument is the name of the event to be fired as defined in the XDP console for your game, and the following additional parameters will also depend on what you have a set up for the stat. The function will return 0 if the event was sent (and should be received/processed by the server) or -1 if there was an error (ie: your event was not setup as the event manifest file included in the project says another number).


Syntax:

xboxlive_fire_event(event_name, [stat_parameters]);

Argument Description
event_name The name of the event to fire.
stat_parameters [OPTIONAL] Additional parameters to add to the event.


Returns:

String


Example:

var _user = xboxlive_get_user(0);
var _uid = xboxlive_user_id_for_user(_user);
result = xboxlive_fire_event("PlayerSessionStart", _uid, global.guid_str, 0, 42, 42);

The above code gets some information about the user then fires off a stat event along with this (and additional) data.